README file for the replication of 
"Mercantilist dualization: the introduction of the euro, redistribution of industry rents, and wage inequality in Germany, 1993-2008"

--------------
AUTHOR CONTACT (as of July 2017):

Fabian Ochsenfeld
Goethe University
Institute for Sociology
Theodor-W.-Adorno-Platz 6
60323 Frankfurt, Germany
Phone: +49.69.789.3661
E-mail: ochsenfeld@soz.uni-frankfurt.de

--------------
DO-FILES:

There are 8 do files:
00_macro_indicators.do
master.do
01_merge_establishments.do
02_merge_persons.do
03_impute_persons.do
04_earnsit_rint.do
05_regwage_reghdfe.do
06_plot.do

--------------
DATA:

There are 11 data files:
deu_cpindex_91-13.dta (Source: OECD)
deu_gdpchange_90-14.dta (Source: OECD)
destatis_houseprices.xlsx (Source: Statistisches Bundesamt)
destatis_orders.xlsx (Source: Statistisches Bundesamt)
IMF_cpis.xlsx (Source: IMF)
macro_combined_6ctrs_b.xlsx (Source: OECD)
oecd_exchangerates_various.xlsx (Source: OECD)
untrade_china.csv (Source: UN Comtrade)
untrade_cz_1992.csv (Source: UN Comtrade)
untrade_east_part1.csv (Source: UN Comtrade)
untrade_east_part2.csv (Source: UN Comtrade)

The LIAB data (QM2 9310) can be accessed on-site at one of the IAB's data centers and through a job submission application (JoSua).
The SIAB data (R 7510) can be obtained from the IAB.
(http://fdz.iab.de/en/FDZ_Data_Access.aspx)

--------------
HOW TO:

1. Chose a directory and create two folders named "Daten" and "Output" therein.
2. Place deu_gdpchange_90-14.dta, macro_combined_6ctrs_b.xlsx, destatis_orders.xlsx, destatis_houseprices.xlsx, IMF_cpis.xlsx, oecd_exchangerates_various.xlsx, untrade_east_part1.csv, untrade_east_part2.csv, untrade_china.csv, untrade_cz_1992.csv, in "Daten".
3. In 00_macro_indicators.do and 06_plot enter your directory in line 4 / line 7 
4. Run 00_macro_indicators.do
5. Collect macrovars_deuiips_85-14_b.dta and trade_93-12.dta from the Output folder and have them placed into the $orig folder in your IAB account. Also have deu_cpindex_91-13.dta and deu_gdpchange_90-14.dta placed there.  
6. Obtain the reghdfe package (https://github.com/sergiocorreia/reghdfe) and upload to JoSua / IAB account. I used version 3.2.9.
7. Upload master.do, 01_merge_establishments.do, 02_merge_persons.do, 03_impute_persons.do, 04_earnsit_rint.do, 05_regwage_reghdfe.do to JoSua / IAB account.
8. Run master.do in JoSua
9. Export all log-files.
10. From 04_earnsit_rint_is.txt, manually copy the results matrix earnsit_lincom_rintdeuis into a blank .txt file and save as 04_earnsit_lincom.txt into the folder "Daten" in your directory.   
11. From 04_earnsit_rint_is.txt, manually copy the results matrix cftrends into a blank .txt file and save as 04_cftrends.txt into the folder "Daten" in your directory.   
12. From 04_earnsit_rint_is.txt, manually copy the results matrix earndelta04 into a blank .txt file and save as 04_earndelta04.txt into the folder "Daten" in your directory.   
13. Place siab_r_7510.dta in the folder "Daten" (or, if your directory does not fulfill data security standards, change directory accordingly)
14. Run 06_plot.do

--------------